<template>
    <div class="card-container">
        <div class="title">
            <span class="status">{{ news.title || '           '}}</span><span class="date">{{ news.created | dateFmt('yyyy-MM-dd hh:mm') }}</span>
        </div>
        <div class="msg">{{ news.content }}</div>
        <div class="serial" v-if="news.express_id">运单编号：{{news.express_id}}</div>
    </div>
</template>

<script>
export default {
    name: 'news-card',
    data() {
        return {};
    },
    props: {
        news: {
            type: Object,
            isRequired: true,
            default: () => {
                return {};
            }
        }
    },
    computed: {},
    created() {},
    mounted() {},
    methods: {},
    watch: {},
    components: {}
};
</script>

<style lang="stylus" scoped>
@import '~assets/main.styl'

*{
    box-sizing border-box
}

.card-container {
    position relative
    width vw(345)
    /*height vh(118)*/
    padding smallMargin middleMargin
    margin-top smallMargin
    background grayF
    flex-y(space-between,flex-start)
    border-radius 10px

    .title {
        width 100%
        flex 0 0 auto
        flex-x()
        span:first-child{
            word-vw(word14,gray3)
            line-height vw(19)
        }
        span{
            word-vw(word12,gray9)
            line-height vw(16)
        }
    }
    .msg {
        flex 1
        word-vw(word14,gray3)
        line-height vw(19)
        margin smallMargin 0 cellPadding 0
        word-break break-all
    }

    .serial {
        flex 0
        word-vw(word12,gray9)
        line-height vw(16)
    }
}
</style>
